home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / MPW_TOOL / TOOLS / TOOLS_WI / PLANET__ / README
Text File  |  1989-12-08  |  4KB  |  96 lines

  1. Welcome to Planet.
  2.  
  3. Planet is freeware, and the copyright is retained by F.T. Mendenhall, 1985.
  4. He has given permission to modify the source for the purpose of porting it to
  5. other machines.  Here is the original notice:
  6.  
  7. /* This is a c program - it runs on a VAX. Several people have
  8.  *   told me that it can be made to run on PC's with some effort.
  9.  *   I have not confirmed this, but subject to my copyright restriction
  10.  *   your [sic] free try to make it work on any machine you want.
  11.  
  12.  * good luck! */
  13.  
  14. /*  Planets
  15.  *           A program to determine the position of
  16.  *         the Sun., Mer., Ven., Mars, Jup, Sat & Ura
  17.  
  18.  *  reference Jean Meesus's book, " Astronomical Formulae for
  19.  *  Calculators
  20.  *            program by
  21.  *
  22.  *            F.T. Mendenhall
  23.  *            ihnp4!inuxe!fred
  24.  *
  25.  *        Copyright 1985 by F.T. Mendenhall
  26.  *        all rights reserved
  27.  *
  28.  * (This copyright prevents you from selling the program - the
  29.  *  author grants anyone the right to copy and install the program
  30.  *  on any machine it will run on) */
  31.  
  32. End of original notice.
  33.  
  34. I have modified the source slightly to produce this MPW version.  The
  35. modifications I made were only enough to get it to run.  I made no effort to
  36. improve on the program.  I did add a little error checking, but not much, so be
  37. careful what you give as input.
  38.  
  39. In the original version, the user was prompted for information such as date
  40. and time every time the program ran.  This style is counter to the Apple
  41. guidelines for MPW tools, and so I've modified it.   If no information is given
  42. at the command line, this usage statement is produced:
  43.  
  44. usage: Planet ([-i] | [month] [day] [year] [time])
  45.                [-l tz <longdeg> <longmin> <latdeg> <latmin>] 
  46. Time Zones:  0 = Universal  5 = EST 6 = CST 7 = MST 8 = PST
  47.  
  48. This is what it means:  If you enter Planet -i, Planet will read the
  49. information it needs from standard input.  This is useful for scripts, and I've
  50. provided one that will enter the information automatically.
  51.  
  52. If you don't use the -i option (i is for input), Planet will expect to find
  53. certain information on the command line.  Specifically, it needs the month, the
  54. day, the year, and the time, all in numerical format.  For example, right now
  55. it's 12/8/89 and the time is 19:34:57.  Planet expects that information in this
  56. format:  12 8 89 1934.
  57.  
  58. I've provided a little tool called CvtDate that will convert output of MPW's
  59. date command to the format needed by Planet.  Thus Planet `date -s | CvtDate`
  60. produces the positions of the planets for the current date and time.
  61. Alternatively, date -s | CvtDate | Planet produces exactly the same results.
  62.  
  63. If you use the -l option, Planet expects the -l to be followed by one or more
  64. location parameters (l is for location).  These parameters tell Planet how your
  65. location differs from the default location.  The original assumed you lived in
  66. Indianapolis, and if you lived elsewhere you had to change the values hardcoded
  67. in the source.  I have changed the location bias to San Francisco, but I have
  68. added the -l option so you can tell Planet where you live without recompiling.
  69.  
  70. The location parameters must be given in the order shown in the usage
  71. statement.  Specifically, if you use the -l option, you must give time zone.
  72. The other parameters are all optional, but for example in order to specify
  73. latitude degrees, you must also specify longitude degrees and minutes.
  74.  
  75. Other features:  I have added an 8-phase rotating cursor that looks a little
  76. like a planet and its moon, or maybe a star and a planet.  Anyway, it looks
  77. astronomical.  If you don't like it, just use ResEdit to delete the acur and
  78. CURS resources in the tool.
  79.  
  80. Also provided are two scripts, Planets and FindChanges.  Planets merely
  81. connects the MPW date command with CvtDate and Planet to fully automate the
  82. data input.  If you don't live in San Fran, add the -l option after Planet -i.
  83. FindChanges goes through the source and locates changes I made, in case you're
  84. curious.  If you move the source files around, you may have to change some path
  85. names in the script.
  86.  
  87. Enjoy...
  88.  
  89. Matthew J. Snyder 
  90. compuserve 71450,2606 
  91. UUCP bmug!Matthew.Snyder@apple.com
  92.  
  93. NOTE: If I decide to split up the executable tool and the source into different
  94. uploads, then the script FindChanges will be with the source upload only.  If
  95. you have the source upload, directions for building can be found in the make
  96. files.